<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script type="module">
  // export
  // 引入的时候必须加{} 
  import { a, sub } from './export.js'

  console.log(a)
  console.log(sub(10))

  // export default
  // 一个页面只有一个 引入不要加{}
  import fn from './export.js'
  console.log(fn(9, 3))
</script>

</html>